#pragma once

// Ownership Policy: destructive copy

template <class P>	// PointerType
class DestructiveCopy
{
public:
	DestructiveCopy()
	{
	}

	template <class P1>
	DestructiveCopy(const DestructiveCopy<P1>& rhs)
	{
	}

	template <class P1>
	static P Clone(P1 &ioVal) 
	{
		P res(ioVal);
		ioVal = P1();	// invalidate previous pointer
		return res;
	}

	bool Release(const P&)
	{
		return true;
	}

	static void Swap(DestructiveCopy &rhs)
	{
	}

	enum { destructiveCopy = true };
};